<template>
  <div class="news-single">
    <div class="main-wrap">
      <div class="title">
        {{ news.title }}
      </div>
      <div class="tips">
        <div>
          <span class="top" v-if="news.isTop">{{
            news.isTop ? "置顶" : ""
          }}</span>
          <span>{{ news.type }}</span>
        </div>
        <span>{{ news.time }}</span>
      </div>
    </div>
    <img :src="news.image" alt="" class="new-images" />
  </div>
</template>

<script>
export default {
  name: "NewsSingle",
  props: {
    news: {
      type: Object,
      default() {
        return {
          title: "习近平就关心下一代工作做出指示",
          type: "国内新闻",
          isTop: true,
          time: "11-19 08:07"
        };
      }
    }
  }
};
</script>

<style lang="scss" scoped>
.news-single {
  border-bottom: 1px solid #dddddd;
  display: flex;
  justify-content: space-between;
  padding: 16px 0;
  .main-wrap {
    display: flex;
    flex: 1;
    margin-right: 10px;
    flex-direction: column;
    justify-content: space-between;
  }
  .new-images {
    width: 120px;
    height: 70px;
    border-radius: 4px;
  }
  .tips {
    color: #999999;
    .top {
      color: #cb6865;
      padding: 0 10px 0 0;
    }
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    padding: 0 10px 0 0;
  }
}
</style>
